Scripting > CxHmiFms > CxFmsClosePeriodCtrl Object > CxFmsClosePeriodCtrl Methods

CxFmsClosePeriodCtrl Methods

The CxFmsClosePeriodCtrl object contains the following methods:

Apply

Applies modified settings and builds the FMS Close Period control.  This method has the same function as the Apply button on the FMS Close Period control.

Syntax

Apply(SessionPropertiesOnly As Boolean)

Parameters

Parameter

Required

Description

SessionPropertiesOnly

No

Note: Because this control does not incorporate session options, setting this property to 1 - Yes (True) is not recommended.

Example

The following example applies settings when a button is pressed.

  

Sub ButtonTool_EventClick()

Dim This : Set This = ButtonTool

FmsClosePeriod.Apply

End Sub

Back to top

Cancel

Cancels the current task. 

Syntax

Cancel()

Remarks

The following is the list of tasks that can be canceled with this method.

Example

The following example cancels a task when a button is pressed.  This example is taken from FMS Close Period Ctrl.csf.

  

Sub btnCancel_EventClick()

Dim This : Set This = btnCancel

FmsClosePeriod.Cancel

End Sub

Back to top

ChooserGetNodeSelection

Returns the list of Nodes currently selected in the Node chooser.

Syntax

ChooserGetNodeSelection() As Variant

Example

The following example displays a message box showing the list of selected Nodes.

  

Sub ButtonTool1_EventClick()

Dim This : Set This = ButtonTool1

Dim aryNodes

aryNodes = FmsClosePeriod.ChooserGetNodeSelection

 

Dim i, strMsg

For i = 0 To UBound(aryNodes)

strMsg = strMsg & aryNodes(i) & Vbcr

Next

 

MsgBox strMsg

End Sub

Back to top

ChooserSetNodeSelection

Sets the selection of Nodes in the Node chooser.

Syntax

ChooserSetNodeSelection(Selections As Variant) As Boolean

Parameters

Parameter

Required

Description

Selections

Yes

The list of Nodes, in "Node ID" format, to select in the Node chooser.

Example

The following example selects three Nodes in the Node chooser.

Sub ButtonTool1_EventClick()

Dim This : Set This = ButtonTool1

Dim aryNodes

Redim aryNodes(2)

 

aryNodes(0) = "2540"

aryNodes(1) = "2541"

aryNodes(2) = "2542"

 

FmsClosePeriod.ChooserSetNodeSelection aryNodes

End Sub

Back to top

Refresh

Refreshes the data in the FMS Close Period control. This method has the same function as the Refresh button on the FMS Close Period control.

Syntax

Refresh()

Example

The following example refreshes the FMS Close Period control when a button is pressed.

Sub ButtonTool1_EventClick()

Dim This : Set This = ButtonTool1

FmsClosePeriod.Refresh

End Sub

Back to top

RetrieveNodes

Populates the Node chooser’s list of Nodes. This method has the same function as the Retrieve Nodes button on the FMS Close Period control’s Node chooser.

Syntax

RetrieveNodes()

Remarks

When this method is called, the Node chooser is populated according to the ChooserSiteServiceSelection, ChooserGroupSelection, ChooserNodeCategorySelection, ChooserFilterString, and ChooserFilterType properties.

Example

The following example retrieves Nodes when the View is initialized.

Sub TheView_EventInitialize()

Dim This : Set This = TheView

FmsClosePeriod.RetrieveNodes

End Sub

Back to top

Let us know how we can improve this topic.

CygNet at weatherford.com

© 2020 Weatherford. All rights reserved.